#pragma once
#include <QPainter>
#include <QWidget>
#include <QDebug>
#include <QToolTip>
#include <QTimer>
#include <QFileDialog>
#include <QRegularExpression>
#include <QRegularExpressionValidator>

#include "RegisterLineEdit.hpp"

namespace Ui {
class UserRegister;
}

class UserRegister : public QWidget
{
    Q_OBJECT

public:
    explicit UserRegister(QWidget *parent = nullptr);
    ~UserRegister();

    void paintEvent(QPaintEvent *event) override;

private slots:
    void on_pushButton_2_clicked();
    void on_close_window_clicked();

    void on_pushButton_3_clicked();



    void on_pushButton_clicked();

signals:
    void goBack();
    void closeWindow();
    void commit(const QString& username, const QString& userid, const QString& password, const QString& head);

private:
    Ui::UserRegister *ui;

    RegisterLineEdit* username;
    RegisterLineEdit* userid;
    RegisterLineEdit* password;
    RegisterLineEdit* password_conform;

    QPixmap m_avatarPixmap;
};

